<?php

/**
 * This is the model class for table "language".
 */

require_once dirname(__FILE__) . '/base/LanguageBase.php';
class Language extends LanguageBase
{
    public static function getLanguageOption()
    {
        $models = self::model()->findAll('status=1');
        return CHtml::listData($models, 'locale', 'name');
    }

    public function behaviors()
    {
        return array(
            'CTimestampBehavior' => array(
                'class' => 'zii.behaviors.CTimestampBehavior',
                'createAttribute' => 'create_time',
                'updateAttribute' => 'update_time',
            )
        );
    }
}